#include <iostream>
#include <string>
#include <map>
#define bin 61 
using namespace std;

map<char,int> a;
void dprepare(){
	for(int i=0;i<=9;i++)
		a['0'+i] = i;
	for(int i=0;i<26;i++)
		a['a'+i] = i+10;
	for(int i=0;i<26;i++)
		a['A'+i] = i+36;
	return;
}

void decrypt(string ciphertext,int *res){
	for(int i=0;i<(ciphertext.length()+1)/3;i++){
		char fir,sec,thi;
		fir = ciphertext[i*3];
		sec = ciphertext[i*3+1];
		thi = ciphertext[i*3+2];
		res[i] = a[fir]*bin*bin+a[sec]*bin+a[thi];
	}
	return;
}

int main(){
	dprepare();
	string input;
	cin>>input;
	int res[(input.length()+1)/3];
	char output[(input.length()+1)/3];
	decrypt(input,res);
	for(int i=0;i<(input.length()+1)/3;i++)
		output[i] = res[i];
	cout<<output;
	return 0;
}
